Skip to content

[7.x] Expose core api types in /public and /server (#32746)#33477

Merged
rudolf merged 1 commit intoelastic:7.xfrom
rudolf:backport/7.x/pr-32746
Mar 19, 2019
Merged

[7.x] Expose core api types in /public and /server (#32746)#33477
rudolf merged 1 commit intoelastic:7.xfrom
rudolf:backport/7.x/pr-32746

Conversation

@rudolf
Copy link
Copy Markdown
Contributor

@rudolf rudolf commented Mar 19, 2019

Backports the following commits to 7.x:

* Expose core api types in /public and /server

* Export CoreStart from core/public

* Export Server and Public from 'kibana'

* Cast frozen object type back to original

The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.

* Be more selective with what gets exported

* Fix type imports in tests

* Fix type errors

* Remove src/type_exports.ts

* More remove src/type_exports.ts

* Remove build:types

* Fix bootstrap import

* Expose internal API's at the top level

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.

* Fix tests

* Put core/{public/server} in their own namespaces
@rudolf rudolf added the backport This PR is a backport of another PR label Mar 19, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@rudolf rudolf merged commit 8c7d846 into elastic:7.x Mar 19, 2019
@rudolf rudolf deleted the backport/7.x/pr-32746 branch March 19, 2019 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants